package com.fsc.mapper;

import com.fsc.entity.domain.TotalScoreInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fsc.entity.vo.TotalScoreInfoVO;
import org.apache.ibatis.annotations.Delete;
import org.springframework.web.bind.annotation.DeleteMapping;

import java.util.List;

public interface TotalScoreInfoMapper extends BaseMapper<TotalScoreInfo> {

	List<TotalScoreInfoVO> selectTotalScoreByExamId(int examsId);

	TotalScoreInfoVO selectTotalScoreByExamIdandStudentId(int examsId, Integer studentId);

    List<TotalScoreInfoVO> selectTotalScoreByExamIdandStuIds(int examId, List<Integer> stuIds);


	void insertOrUpdate(TotalScoreInfo totalScoreInfo);

	void updateById(TotalScoreInfoVO totalScoreInfoVO);

	@Delete("DELETE FROM total_score_info where exams_id =#{id}")
	void deleteByExamsId(Integer id);
}